package com.coolwen.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.coolwen.common.HttpConstants;
import org.apache.log4j.Logger;

/**
 * Created by user on 2016/5/13.
 */
public class BaseController {
    protected Logger logger = Logger.getLogger(this.getClass());
    protected final static String DATE_FORMATE = "yyyy-MM-dd";

    /**
     * 返回服务端处理结果
     *
     * @param obj 服务端输出对象
     * @return 输出处理结果给前段JSON格式数据
     * @author coolwen
     * @since 2016-05-13
     */
    public String responseResult(Object obj) {
        JSONObject jsonObj = new JSONObject();
        if (obj != null) {
            logger.info(""+JSON.toJSON(obj));


        }

        return jsonObj.toString();

    }
}
